package com.wonders.frame.common.Enum;


import com.wonders.frame.entity.AuthUser;

public enum LoginCodeEnum {
    SUCCESS(0, "登录成功！"),
    ACCOUNT_NOT_EXIST(1, "账号不存在！"),
    PASSWORD_IS_WRONG(2, "密码错误！")
    ;

    private Integer code;
    private String msg;
    private AuthUser authUser;

    LoginCodeEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode(){
        return this.code;
    }
    public String getMsg(){
        return this.msg;
    }

    public AuthUser getAuthUser() {
        return authUser;
    }

    public LoginCodeEnum setAuthUser(AuthUser authUser) {
        this.code = SUCCESS.code;
        this.msg = SUCCESS.msg;
        this.authUser = authUser;
        return this;
    }
}
